public class Zuoye7 {
    public static void main(String[] args) {
        int a=1000;
        while(a<=100000)
        {
            if(a%7==0)
                System.out.println(a);
            a++;
        }
    }
}
